<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
    function ran(digit){
        var result="";
        for(i=0;i<digit;i++){
            result=result+(Math.floor(Math.random()*6)+1);
        }
        alert(result);
    }
    ran(6);
</script>
</body>
</html>
